//
//  KABCosDetailHeaderHFView.m
//  kabu
//
//  Created by XiangDongMBP on 2017/2/15.
//  Copyright © 2017年 East. All rights reserved.
//

#import "KABCosDetailHeaderHFView.h"
#import "TTTAttributedLabel.h"
#import "GlobalHeader.h"
#import "UIColor+XDHex.h"

@interface KABCosDetailHeaderHFView ()<TTTAttributedLabelDelegate>

@end

@implementation KABCosDetailHeaderHFView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    NSDictionary *atts = @{NSForegroundColorAttributeName : [UIColor xd_colorWithHex:KABGlobalColorTabBarItemColor]};
    self.titleLabel.linkAttributes = atts;
    self.titleLabel.activeLinkAttributes = nil;
    self.titleLabel.inactiveLinkAttributes = nil;
    self.titleLabel.delegate = self;
}

#pragma mark - TTTAttributedLabelDelegate
- (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url {
    if ([self.delegate respondsToSelector:@selector(kABCosDetailHeaderHFView:linkTapped:)]) {
        [self.delegate kABCosDetailHeaderHFView:self linkTapped:url];
    }
}

@end
